Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Dockerfile from using Python 3.6 to 3.10 #8135

Merged
merged 3 commits into from
Jun 30, 2022

Conversation

ivanmkc
Copy link
Collaborator

@ivanmkc ivanmkc commented Jun 29, 2022

Dockerfile build fails with:

Step #0: �[0mERROR: This script does not work on Python 3.6 The minimum supported Python version is 3.7. Please use https://bootstrap.pypa.io/pip/3.6/get-pip.py instead.
Step #0: The command '/bin/sh -c wget --no-check-certificate -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py'     && python3.6 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION"     && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION"     && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ]' returned a non-zero code: 1
Finished Step #0
ERROR

@ivanmkc ivanmkc requested a review from a team as a code owner June 29, 2022 18:59
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Jun 29, 2022
Copy link
Collaborator

@dandhlee dandhlee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use at least Py3.8? 3.7 will be deprecated next.

@@ -1,4 +1,4 @@
# Copyright 2020 Google LLC
# Copyright 2022 Google LLC
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The copyright year must reflect the year it was introduced, not the most recent edited yet.

Suggested change
# Copyright 2022 Google LLC
# Copyright 2020 Google LLC

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good to know, will revert.

@ivanmkc
Copy link
Collaborator Author

ivanmkc commented Jun 29, 2022

Note: I will try to upgrade to 3.10 if it works.

@ivanmkc
Copy link
Collaborator Author

ivanmkc commented Jun 29, 2022

Is it possible to use at least Py3.8? 3.7 will be deprecated next.

@parthea asked for 3.10, we can try to jump directly there.

@ivanmkc ivanmkc changed the title Updated Dockerfile from using Python 3.6 to 3.7 Updated Dockerfile from using Python 3.6 to 3.10 Jun 29, 2022
@ivanmkc
Copy link
Collaborator Author

ivanmkc commented Jun 29, 2022

The linter kicked in and changed many lines, shall I revert the linting?

@dandhlee
Copy link
Collaborator

If the Kokoro lint doesn't complain then it's fine

@ivanmkc
Copy link
Collaborator Author

ivanmkc commented Jun 29, 2022

@dandhlee thanks, please merge if the checks pass. I think the CI might fail again as it did with #8082

@ivanmkc
Copy link
Collaborator Author

ivanmkc commented Jun 30, 2022

There's a test failure, but not sure what the context is:



main_test.py::test_index FAILED                                          [100%]

=================================== FAILURES ===================================
__________________________________ test_index __________________________________
Traceback (most recent call last):
  File "/workspace/appengine/standard/migration/storage/main_test.py", line 23, in test_index
    r = client.get('/')
  File "/workspace/appengine/standard/migration/storage/.nox/py-2-7/lib/python2.7/site-packages/werkzeug/test.py", line 1006, in get
    return self.open(*args, **kw)
  File "/workspace/appengine/standard/migration/storage/.nox/py-2-7/lib/python2.7/site-packages/flask/testing.py", line 227, in open
    follow_redirects=follow_redirects,
  File "/workspace/appengine/standard/migration/storage/.nox/py-2-7/lib/python2.7/site-packages/werkzeug/test.py", line 970, in open
    response = self.run_wsgi_app(environ.copy(), buffered=buffered)
  File "/workspace/appengine/standard/migration/storage/.nox/py-2-7/lib/python2.7/site-packages/werkzeug/test.py", line 861, in run_wsgi_app
    rv = run_wsgi_app(self.application, environ, buffered=buffered)
  File "/workspace/appengine/standard/migration/storage/.nox/py-2-7/lib/python2.7/site-packages/werkzeug/test.py", line 1096, in run_wsgi_app
    app_rv = app(environ, start_response)
  File "/workspace/appengine/standard/migration/storage/.nox/py-2-7/lib/python2.7/site-packages/flask/app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "/workspace/appengine/standard/migration/storage/.nox/py-2-7/lib/python2.7/site-packages/flask/app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "/workspace/appengine/standard/migration/storage/.nox/py-2-7/lib/python2.7/site-packages/flask/app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/workspace/appengine/standard/migration/storage/.nox/py-2-7/lib/python2.7/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/workspace/appengine/standard/migration/storage/.nox/py-2-7/lib/python2.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/workspace/appengine/standard/migration/storage/.nox/py-2-7/lib/python2.7/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/workspace/appengine/standard/migration/storage/.nox/py-2-7/lib/python2.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/workspace/appengine/standard/migration/storage/.nox/py-2-7/lib/python2.7/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/workspace/appengine/standard/migration/storage/main.py", line 50, in get
    bucket.delete_blob(blob_name)
  File "/workspace/appengine/standard/migration/storage/.nox/py-2-7/lib/python2.7/site-packages/google/cloud/storage/bucket.py", line 1611, in delete_blob
    _target_object=None,
  File "/workspace/appengine/standard/migration/storage/.nox/py-2-7/lib/python2.7/site-packages/google/cloud/storage/client.py", line 662, in _delete_resource
    _target_object=_target_object,
  File "/workspace/appengine/standard/migration/storage/.nox/py-2-7/lib/python2.7/site-packages/google/cloud/storage/_http.py", line 80, in api_request
    return call()
  File "/workspace/appengine/standard/migration/storage/.nox/py-2-7/lib/python2.7/site-packages/google/cloud/_http.py", line 484, in api_request
    raise exceptions.from_http_response(response)
NotFound: 404 DELETE https://storage.googleapis.com/storage/v1/b/python-docs-samples-tests/o/storage-migration-test-blob?prettyPrint=false: No such object: python-docs-samples-tests/storage-migration-test-blob
- generated xml file: /workspace/appengine/standard/migration/storage/sponge_log.xml -
========================= 1 failed in 10768.43 seconds =========================
nox > Command pytest --junitxml=sponge_log.xml failed with exit code 1
nox > Session py-2.7 failed.


err: signal: killed

@dandhlee
Copy link
Collaborator

It's an unrelated failure, we can ignore it.

@dandhlee dandhlee added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 30, 2022
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 30, 2022
@ivanmkc
Copy link
Collaborator Author

ivanmkc commented Jun 30, 2022

@dandhlee thanks for the confirmation. If all is fine, please feel free to merge.

@dandhlee
Copy link
Collaborator

2.7 failure is unrelated to this change. Admin merging.

@dandhlee dandhlee merged commit 617af66 into main Jun 30, 2022
@dandhlee dandhlee deleted the ivanmkc--dockerfile-python-3.6-to-3.7 branch June 30, 2022 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants